Python Library Objects

From version 7.2, Real-Time Designer has new Python functions enabling you to execute Python code or methods from a file.

To see how to use these functions, see Using Python Functions.

The functions are exposed under Project > References > Library References > Direct.Scripting > Execute Python Function.

To use the Execute Python Code from File function, create an instance of Python Parameters for Code. You can enter the details in the following parameters during initialization or you can invoke a function to assign values to the parameters.

To use the Execute Python Method from File function, create an instance of Python Parameters for Method. You can enter the details in the following parameters during initialization or you can invoke a function to assign values to the parameters.

These functions can accept any number of parameters that can be referenced via a list of parameters. Currently String (text, string, str), Integer (number, integer, int), Boolean, and Decimal parameter types are supported.